﻿namespace MementoDemo
{
    internal class TextEditorMemento : IMemento
    {
        private readonly string state;
        private readonly DateTimeOffset created;

        public TextEditorMemento(string state)
        {
            this.state = state;
            created = DateTimeOffset.Now;
        }
        public DateTimeOffset GetCreatedDate()
        {
            return created;
        }

        public string GetState()
        {
            return state;
        }
    }
}
